// 签名
import _bale from '../utils/package.js'
// 获取不同的接口地址
import { SSO_API, SHARE_API, ACTIVITY_API } from '../config/index.js'
import { Service } from '../utils/server.js'
class CartModel extends Service {
  // 查询购物车
  getShopCart(params) {
    return this.postRequest(ACTIVITY_API + '/shopCart/selectShopCart', {
      data: _bale('selectShopCart', params)
    })
  }

  // 删除购物车
  delCartGoods(params) {
    return this.postRequest(ACTIVITY_API + '/shopCart/deleteShopCart', {
      data: _bale('deleteShopCart', params)
    })
  }

  //更新购物车数量
  updateGoodsNum(params) {
    return this.postRequest(ACTIVITY_API + '/shopCart/updateShopCartNum', {
      data: _bale('deleteShopCart', params)
    })
  }
  // 订单结算 去结算
  // submitCart(params) {
  //   return this.postRequest(ORDER_API + '/order/confirmOrder', {
  //     data: _bale('confirmOrder', params)
  //   })
  // }
}
export { CartModel }
